﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WebEntities.Models.WebInfo
{
    public enum JobShowStatus { Hide, Show }

    public class Jobs
    {
        public int JobID { get; set; }
        public string JobName { get; set; }
        public string JobAddress { get; set; }
        public string JobPepleNum { get; set; }
        public string JobSex { get; set; }
        public string WorkExperience { get; set; }
        public string EduBackGround { get; set; }
        public DateTime CreateTime { get; set; }
        public DateTime? PubTime { get; set; }
        public DateTime? LimitTime { get; set; }
        public byte IsShow { get; set; }
        public int? Sort { get; set; }
        public string JobDes { get; set; }
        public string CompanyName { get; set; }
        public string CompanyIntro { get; set; }

        public static Jobs AsJobs(WI_Jobs wijob)
        {
            Jobs job = new Jobs
            {
                JobID=wijob.JobID,
                JobName=wijob.JobName,
                JobAddress=wijob.JobAddress,
                JobPepleNum = wijob.JobPepleNum,
                JobSex = wijob.JobSex,
                WorkExperience = wijob.WorkExperience,
                EduBackGround = wijob.EduBackGround,
                CreateTime = wijob.CreateTime,
                PubTime = wijob.PubTime,
                LimitTime = wijob.LimitTime,
                IsShow = wijob.IsShow,
                Sort = wijob.Sort,
                JobDes = wijob.JobDes,
                CompanyName = wijob.CompanyName,
                CompanyIntro = wijob.CompanyIntro
            };
            return job;
        }
    }
}
